import { Utility } from "@/libs/utility"

export const GroupDosingConfigurationFormConfig = (item) => {
	return [
		{
			fieldName: "id",
			fieldCNName: "",
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "",
			span: 2,
		},
		{
			// 这里应该是选择的，后面再确认
			fieldName: "drugName",
			fieldCNName: "",
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "",
			span: 2,
		},
		{
			fieldName: "groupId",
			fieldCNName: "",
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "",
			span: 2,
		},
		{
			fieldName: "groupName",
			fieldCNName: "",
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "",
			span: 2,
		},
		// {
		// 	/** 字段名，如：name */
		// 	fieldName: "periodNo",
		// 	/** 字段对应的中文解释，如：姓名 */
		// 	fieldCNName: "周期号",
		// 	/** 字段的值，如：张三 */
		// 	filedValue: 1,
		// 	/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
		// 	type: "select",
		// 	rules: {
		// 		required: true, // 只有为true的时候才写，为false这个字段不要
		// 	},
		// 	span: 2,
		// 	itemList: [
		// 		{
		// 			// 类似于name
		// 			label: "类型一",
		// 			// 类似于id
		// 			value: 1,
		// 		},
		// 		{
		// 			// 类似于name
		// 			label: "类型二",
		// 			// 类似于id
		// 			value: 2,
		// 		},
		// 	],
		// },
		// {
		// 	fieldName: "drugSeq",
		// 	fieldCNName: "给药序号",
		// 	filedValue: "",
		// 	/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
		// 	type: "inputText",
		// 	rules: {
		// 		required: true, // 只有为true的时候才写，为false这个字段不要
		// 	},
		// 	span: 2,
		// },
		{
			/** 字段名，如：name */
			fieldName: "drugNo",
			/** 字段对应的中文解释，如：姓名 */
			fieldCNName: "基于给药序号",
			/** 字段的值，如：张三 */
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "select",
			rules: {
				required: true, // 只有为true的时候才写，为false这个字段不要
			},
			span: 2,
			itemList: item.drugTimeList
		},
		{
			fieldName: "oppositeDay",
			fieldCNName: "相对天数",
			filedValue: "",
			disabled: true,
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "inputNumber",
			span: 2,
			rules: {
				required: true, // 只有为true的时候才写，为false这个字段不要
			},
		},
		{
			fieldName: "oppositeTime",
			fieldCNName: "相对时间",
			filedValue: "",
			disabled: true,
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "time",
			span: 2,
			rules: {
				required: true, // 只有为true的时候才写，为false这个字段不要
			},
		},
		{
			// 这里应该是选择的，后面再确认
			fieldName: "drugId",
			fieldCNName: "药品",
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "select",
			span: 2,
			rules: {
				required: true, // 只有为true的时候才写，为false这个字段不要
			},
			itemList: item.drugList,
		},
		{
			fieldName: "drugType",
			fieldCNName: "药品类型",
			filedValue: "",
			disabled: true,
			span: 2,
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "select",
			itemList: Utility.getDictList("drug_type"),
			rules: {
				required: true, // 只有为true的时候才写，为false这个字段不要
			},
		},
		{
			fieldName: "drugWay",
			fieldCNName: "给药途径",
			disabled: true,
			span: 2,
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "select",
			itemList: Utility.getDictList("drug_way"),
			rules: {
				required: true, // 只有为true的时候才写，为false这个字段不要
			},
		},
		{
			fieldName: "formulation",
			fieldCNName: "剂型",
			span: 2,
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "select",
			itemList: Utility.getDictList("drug_form"),
			disabled: true,
			rules: {
				required: true, // 只有为true的时候才写，为false这个字段不要
			},
		},
		{
			fieldName: "dosage",
			fieldCNName: "用量",
			span: 2,
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "inputNumber",
		},
		{
			fieldName: "unit",
			fieldCNName: "单位",
			disabled: true,
			span: 2,
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "inputText",
		},
		{
			fieldName: "drinkWater",
			fieldCNName: "饮水",
			span: 2,
			filedValue: "",
			/** 字段类型，inputText，inputPwd,inputNumber,date,datetime,dateRange,textarea,upload,select,radio,checkbox,switch*/
			type: "inputNumber",
		},
	];
}

